home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- ::**********************************************************************
- :: Demonstrates using a batch file to script GetRight.
- :: Shows checking to see if file exists, dialing, downloading, hanging up.
- ::
- :: You must use START /W if you use the /W parameter in GetRight so
- :: that a Windows DOS prompt will really wait until everything finishes
- :: to continue with the batch file.
- ::**********************************************************************
-
- ::*** See if the file already exists.
- ::*** Uses the fact that GetRight adds .GetRight to the name until the file is done.
- if exist c:\junk.html goto EXIT
-
-
- ::*** Dial the modem...
- start /w GETRIGHT.EXE /dial /w
-
- ::*** Download the file...
- start /w GETRIGHT.EXE /url:"http://www.getright.com/index.html" /file:"c:\junk.html" /w
-
- ::*** Hangup the modem...
- GETRIGHT.EXE /hangup
-
-
- ::*** Check if file exists to give OK or fail msg.
- if exist c:\junk.html goto DONE_DOWNLOAD
- echo ERROR: Download Failed!
- goto EXIT
- :DONE_DOWNLOAD
- echo Downloaded OK!
-
-
- :EXIT